imx: make imx uart work for debug mode
authorAnson Huang <[email protected]>
Tue, 15 Jan 2019 06:27:10 +0000 (14:27 +0800)
committerAnson Huang <[email protected]>
Tue, 15 Jan 2019 06:32:31 +0000 (14:32 +0800)
commit2e8ab4f538032dda4f0c3e69e3d94c6f37a9bd25
tree0f47341a2c4ef0f4ef4814c8a5a97bed19aa67dd
parentf1ac79642e0f9a2320f95a8e53042be625a989e0
imx: make imx uart work for debug mode

With DEBUG_CONSOLE enabled, build will fail for imx8mq platform:

./build/imx8mq/release/bl31/imx8mq_bl31_setup.o:
In function `bl31_early_platform_setup2':
imx8mq_bl31_setup.c:(.text.bl31_early_platform_setup2+0x40):
undefined reference to `console_uart_register'
Makefile:741: recipe for target 'build/imx8mq/release/bl31/bl31.elf' failed
make: *** [build/imx8mq/release/bl31/bl31.elf] Error 1

Besides, the .console_flush callback needs to be added to avoid
panic when debug mode is enabled, since the console_flush() will
call it without checking whether the function callback is valid.

Signed-off-by: Anson Huang <[email protected]>
plat/imx/common/imx_uart_console.S
plat/imx/common/include/imx_uart.h
plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c